package aomo.mmma


import akka.actor.typed.scaladsl.{ActorContext, Behaviors, TimerScheduler}
import akka.actor.typed.{ActorRef, Behavior, PostStop, PreRestart}
import akka.util.Timeout
import aomo.mmma.SendSms.{Accepted, Command, Response, Start}

import scala.concurrent.Await
import scala.concurrent.duration._

/**
 *
 * @author liuzhenchuan@foxmail.com
 * @date 2021/3/26
 */
object SendSms {

  trait Command
  case object Start extends Command

  sealed trait Response
  case object Accepted extends Response
  case object Rejected extends Response

}

class SendSms(context: ActorContext[SendSms.Command]){

  private implicit val askTimeout: Timeout = 5.seconds

  def start(): Behavior[Command] = Behaviors.receiveMessage {
    case Start=>
      Behaviors.same
  }

//  private def active(): Behavior[Response] = {
//    case Accepted=>
//      Behaviors.same
//    case Rejected=>
//      Behaviors.same
//  }

}